package cn.tedu.submarine;

import javax.crypto.interfaces.PBEKey;
import javax.swing.*;
import java.awt.*;

public class Battleship extends Property implements EnemyLife{
    protected int life;
    public Battleship(){
        super(66,26,270,124,20);
        life=5;
    }
    public void move(){

    }
    public void moveLeft(){
        x-=speed;
    }
    public void moveRight(){
        x+=speed;
    }
    public ImageIcon getImage(){
        return Images.battleship;
    }
    public Bomb BombShoot(){
        return new Bomb(this.x,this.y);
    }
    public void addLife(int num){
        life += num;
    }
    public int getLife(){
        return life;
    }
    public int subtractLife(){
        return life--;
    }
}
